////public class text2 {
//////    public static void drap(shape sha){
//////sha.show();
//////    }
////    public static void main(String[] args) {
////        shape yuan = new yuan();
////        shape sanjiao = new sanjiao();
////        shape juxing = new juxing();
////        shape []s1={yuan,sanjiao,juxing};
////        for (shape shap:s1){
////            shap.show();
////        }
////    }
////}
////class shape{
////    public void show(){
////        System.out.println("画图形");
////    }
////}
////class yuan extends shape{
////    @Override
////    public void show() {
////        System.out.println("O");
////    }
////}
////class sanjiao extends  shape{
////    @Override
////    public void show() {
////        System.out.println("▲");
////    }
////}
////class juxing extends shape{
////    @Override
////    public void show() {
////        System.out.println("矩形");
////    }
////}
////
//public class text2 {
//    public static void main(String[] args) {
//        shapes y = new yuan();
//        shapes j= new juxing();
//        shapes s=new san();
//        shapes[]shape={y,j,s};
//        for (shapes sha:shape){
//            sha.show();
//        }
//    }
//}
//class shapes{
//    public void show(){
//        System.out.println("打印图形");
//    }
//}
//class yuan extends shapes{
//    public void show(){
//        System.out.println("O");
//    }
//}
//class juxing extends shapes{
//    public void show(){
//        System.out.println("正方");
//    }
//}
//class san extends shapes{
//    public void show(){
//        System.out.println("三角");
//    }
//}
//abstract class a{
//
//}
//
//interface Inshap{
//
// }
public class text2 {
    public static void main(String[] args) {
        Computer computer = new Computer();
        computer.powerOn();
        computer.useDevice(new mouse());
        computer.useDevice(new keyBoard());
        computer.poweroff();
    }
}
